﻿using Common;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SelectRequest : BaseRequest
{
	Grid grid2;
	public override void Start() {
		requestCode = RequestCode.Game;
		actionCode = ActionCode.Select;
		grid2 = gameRoot.gamePanel1.gird;
		base.Start();
	}


	public void RequestSelect(int x, int y, string path) {
		string data = x + "," + y + "," + path;
		SendRequest(data);
	}

	public override void OnResponse(string data) {
		base.OnResponse(data);

		string[] ss = data.Split(',');
		int x = int.Parse(ss[0]);
		int y = int.Parse(ss[1]);
		string path = ss[2];
		grid2.items[x, y].Show_UI(path);
	}


}
